/*
 * Game.hh
 *
 *  Created on: Jan 9, 2013
 *      Author: Zermingore
 */

#ifndef GAME_HH_
#   define GAME_HH_

#   include "core/Scene.hh"

#   include "media/Sound.hh"
#   include "input/Input.hh"


class Game
{
    public:
        Game();
        ~Game();

        /** Main method, called from the main
         ** \return eventually an error code; 0 otherwise
         */
        int play();

        void limitFramerate();

        void playSound();

        /** main loop
         ** \return eventually an error code; 0 otherwise
         */
        int loop();

    private:
        double _frameRate; /// framerate limit
        double _start, _end, _elapsed; /// useful to calculate number of rendered frames
        Input* _input;
        Scene* _scene;
};

#endif /* GAME_HH_ */
